#include "Point.h"

using namespace Math;

//Constructor
Point::Point(float x, float y, float z):_x(x),_y(y),_z(z)
{
}

//Copy constructor
Point::Point(const Point& p):_x(p.x()),_y(p.y()),_z(p.z())
{
}

/**********
* GETTERS *
**********/
float Point::x() const
{
	return _x;
}

float Point::y() const
{
	return _y;
}

float Point::z() const
{
	return _z;
}

/**********
* SETTERS *
**********/

void Point::setX(float val)
{
	_x=val;
}

void Point::setY(float val)
{
	_y=val;
}

void Point::setZ(float val)
{
	_z=val;
}

void Point::setPosition(float valX, float valY, float valZ)
{
	_x=valX;
	_y=valY;
	_z=valZ;
}

/**********
* UTILITY *
**********/
//Output to string
std::string Point::toString()
{
	return "("+getString<float>(_x)+";"+getString<float>(_y)+";"+getString<float>(_z)+")";
}

/************
* OPERATORS *
************/
